import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

import 'image/base_image.dart';

class EyeIcon extends StatelessWidget {
  final bool value;
  final VoidCallback onTap;

  const EyeIcon({
    @required this.value,
    this.onTap,
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: BaseImage(
        'assets/image/${!value ? 'pass_eye_open' : 'pass_eye_off'}.png',
        width: 30.w,
        height: 30.w,
        fit: BoxFit.cover,
      ),
    );
  }
}
